<template>
   <div class="app">
    <el-table
    :data="tableData"
    style="width: 100%">
    <el-table-column type="expand">
      <template slot-scope="props">
        <el-form label-position="left" inline class="demo-table-expand">
          <el-form-item label="支付编号">
            <span>{{ props.row.transactionId }}</span>
          </el-form-item>
        </el-form>
      </template>
    </el-table-column>
    <el-table-column
      label="订单号"
      prop="paymentId">
    </el-table-column>
    <el-table-column
      label="支付金额"
      prop="amount">
    </el-table-column>
    <el-table-column
      label="支付时间"
      prop="createdAt">
    </el-table-column>
  </el-table>
   </div>
</template>

<script>
  export default {
    data() {
      return {
        tableData: []
      }
    },
    created() {
    this.load();
  },
  methods: {
    load() {
      this.request.get("/payments/getPayments").then(res => {
        console.log(res.data);
        this.tableData = res.data;
      });
    },
}
  }
</script>

<style>
.app {
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: 100%;
  height: 100vh;
  box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.75);
  margin-left: 15px;
  border-radius: 10px;
  background-color: white;
}
  .demo-table-expand {
    font-size: 0;
  }
  .demo-table-expand label {
    width: 90px;
    color: #99a9bf;
  }
  .demo-table-expand .el-form-item {
    margin-right: 0;
    margin-bottom: 0;
    width: 50%;
  }
</style>